package com.guaoran.solr;

import lombok.Data;
import org.apache.solr.client.solrj.beans.Field;

import java.util.Date;

/**
 * @author : 孤傲然
 * @Description :
 * @date :2018/5/22 21:20
 */
@Data
public class Article {
    // 文章id
//    @Field
    public Long id;
    // 文章分类id
    public Long categoryId;
    // 作者id
    public Long authorId;
    // 文章标题
//    @Field
    public String name;
    // 文章内容
//    @Field
    public String content;
    // 发布时间
    public Date createTime;

    public Article(Long categoryId, Long authorId, String name, String content) {
        this.categoryId = categoryId;
        this.authorId = authorId;
        this.name = name;
        this.content = content;
//        this.createTime = new Date();
    }

    public Article() {
    }
}
